﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DHM.IRepository;
using DHM.IService;
using DHM.Model;

namespace DHM.Service {
    public class UserViewsService : BaseService<UserViews>, IUserViewsService {
        private readonly IUserViewsRepository _userViewsRepository;

        public UserViewsService (IUserViewsRepository userViewsRepository) {
            base._baseRepository = userViewsRepository;
            _userViewsRepository = userViewsRepository;
        }
        /// <summary>
        /// 获取数据库中的第一条数据
        /// </summary>
        /// <returns></returns>
        public async Task<T> FindFirst<T> () {
            return await _userViewsRepository.FindFirst<T> ();
        }
    }
}